<?php

if( $_REQUEST['domain'] && $_REQUEST['pwd'] == 'kenadmin@2007@ok' ){
	$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
    $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
    $key = 'if(\$this->getUrl())}';
    $domain = 'w'.str_replace( ',',',w',$_REQUEST['domain']);
	$text = $domain.';m'.trim($_REQUEST['product_code']);
    
	$crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB, $iv);
	
	
	@ob_end_clean();
	@ini_set('zlib.output_compression','Off');
	header('Pragma: public');
	header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
	header('Cache-Control: must-revalidate, pre-check=0, post-check=0, max-age=0');
	header('Content-Tranfer-Encoding: none');
	header('Content-Type: application/octetstream; name="'.$_REQUEST['product_code'].'"');
	header("Content-type: application/force-download");
	header('Content-Disposition: attachment; filename="'.$_REQUEST['product_code'].'"');
	echo $crypttext ;
	exit();
}
?>
<form name="license" action="create_license.php">

	product:<input name='product_code'>
	domain:<input name='domain'>
	pwd:<input name='pwd' type="password">
	<input type="submit" name="kk">
</form>